package com.peng.consistenthash.v2;

import java.util.List;

/**
 * Cluster
 *
 * @author: lupeng10
 * @create: 2023-04-18 20:29
 */
public interface Cluster {
    void addNode(Node node);

    default void removeNode(Node node) {
        this.removeNode(node.getName());
    }

    void removeNode(String nodeName);

    Node get(String key);

    List<Node> getNodes();
}
